package cn.ywang.framework;

import java.lang.reflect.Proxy;
import java.util.HashMap;
import java.util.Map;

/**
 * @Auther: BeatificWang
 * @Date: 2018/11/17 16:47
 */
public class Configuration {
	public <T> T getMapper(Class<T> clazz, SqlSession sqlSession) {
		return (T) Proxy.newProxyInstance(this.getClass().getClassLoader(), new Class[]{clazz}, new MapperProxy(sqlSession));
	}

	static class MemberMapperXML {
		public static final String namespace = "cn.ywang.mapper.MemberMapper";

		public static final Map<String, String> methodSql = new HashMap<>();

		static {
			methodSql.put("selectByPrimaryKey", "select * from t_member where id=%d");
		}
	}
}
